/*
 * Node.cpp
 *
 *  Created on: Oct 1, 2010
 *      Author: Jacob
 */
#include "stdafx.h"
#include "Node.h"

Node* Node::newNodeFromData(string placeholderData)
{
	return new Node(placeholderData);
}


Node::Node(string placeholderData)
{
	this->data = placeholderData;
	this->next = NULL;
}


Node::Node()
{
	this->next = NULL;
	this->data = "Undefined";
}

Node::~Node()
{
	cout << "\n Node " << this << " Destructor called";
	delete next;
}

Node* Node::getNext()
{
	return this->next;
}

void Node::setNext(Node* next)
{
	this->next = next;
}

string Node::getData()
{
	return this->data;
}

void Node::setData(string newData)
{
	this->data = newData;
}
